<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>${setting.siteName}- 意见反馈表详情</title>
<meta name="keywords" content="${setting.siteName}">
<meta name="description" content="${setting.siteName}">
<!-- BEGIN HEADER -->
[#include "/admin/include/style.ftl"]
<!-- END HEADER -->
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content  animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>意见反馈表详情</h5>
						<div class="ibox-tools">
							<button type="button" class="btn btn-outline btn-white btn-xs"
								id="btn-return-loippi"
								onclick="location.href='${base}/admin/feedback/list.jhtml'">
								<i class="fa fa-reply-all"></i> 返回列表
							</button>
						</div>
					</div>
					<div class="ibox-content">
					<h3>基本信息</h3>
						<form id="inputForm" class="form-horizontal" action="${base}/admin/feedback/update.jhtml"
							method="post">
							<input type="hidden" value="${(feedback.id)!''}" name="id" />
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label"> 状态</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.status == 1)?string('已处理', '未处理')!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label">角色</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.role)!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label"> 手机</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.mobile)!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label">User ID</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.userId)!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label">姓名</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.userName)!''}</p>
										</div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label"> 反馈时间</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.createDate?string('yyyy-MM-dd HH:mm'))!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label"> 内容</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.content)!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
						[#if feedback.status == 1]
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label">回复</label>
										<div class="col-sm-9">
											<p class="form-control-static">${(feedback.replyContent)!''}</p>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
						[/#if]
						[#if feedback.status == 0]
							<!--/row-->
							<div class="form-group">
								<div class="row">
									<div class="col-sm-6">
										<label class="col-sm-3 control-label">回复</label>
										<div class="col-sm-9">
											<textarea name="replyContent" rows="5" id="replyContent" class="form-control"></textarea>
										</div>
									</div>
								</div>
							</div>
							<!--/row-->
						[/#if]
						[#if feedback.status == 1]
						<div class="form-group">
							<div class="row">
								<div class="col-sm-6">
									<label class="col-sm-3 control-label"> 处理人账号</label>
									<div class="col-sm-9">
										<p class="form-control-static">${(feedback.handlerAccount)!''}</p>
									</div>
								</div>
							</div>
						</div>
						<div class="form-group">
							<div class="row">
								<div class="col-sm-6">
									<label class="col-sm-3 control-label"> 处理人姓名</label>
									<div class="col-sm-9">
										<p class="form-control-static">${(feedback.handlerName)!''}</p>
									</div>
								</div>
							</div>
						</div>
						<div class="form-group">
							<div class="row">
								<div class="col-sm-6">
									<label class="col-sm-3 control-label"> 处理时间</label>
									<div class="col-sm-9">
										<p class="form-control-static">${(feedback.replyTime?string('yyyy-MM-dd HH:mm'))!''}</p>
									</div>
								</div>
							</div>
						</div>
						[/#if]
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<div class="col-sm-12 col-sm-offset-10">
									[#if feedback.status == 0]
										<button type="button" class="btn btn-info"
										id="replyBtn">标记为已处理</button>
									[/#if]
									<button type="button" class="btn btn-default"
										onclick="location.href='${base}/admin/feedback/list.jhtml'">返回</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- BEGIN Script -->
	[#include "/admin/include/script.ftl"]
	<!-- END Script -->
	<script type="text/javascript">
        $(document).ready(function () {
           
            // 标记单条记录
           $("#replyBtn").click(function(){
	           	var id = ${feedback.id};
	           	console.log(id);
	           	var replyContent = $("#replyContent").val();
		 		$.ajax({
					url: "${base}/admin/feedback/reply.jhtml",
					type: "POST",
					data: {
						id: id,
						replyContent: replyContent
						},
					dataType: "json",
					cache: false,
					success: function(message) {
						art.message(message);
						window.setTimeout(function() {
								window.location.reload();
							}, 500);
					}
				});
          	}); 
           });
   </script>
</body>
</html>
